<?php
class Zendvn_Paginator{
	
	public function createPaginator($arrParam = null, $option = null){
		if($option == null){
			$countItem = $arrParam['countItem'];
			$apdater = new Zend_Paginator_Adapter_Null($countItem);
			
			$paginator = new Zend_Paginator($apdater);	
				
			$itemCountPerPage = $arrParam['itemCountPerPage'];
			$paginator->setItemCountPerPage($itemCountPerPage);
			
			$pageNumber = $arrParam['pageNumber'];
			$paginator->setCurrentPageNumber($pageNumber);
			
			$pageRange = $arrParam['pageRange'];
			$paginator->setPageRange($pageRange);
			
			return $paginator;
		}
	}
}